//package com.utils.spring.shirospringboot.controller;
//
//import java.math.BigDecimal;
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Map;
//
//import org.apache.shiro.SecurityUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.alibaba.fastjson.JSONObject;
//import com.kyhd.dshp.manage.enums.ResultStatusCode;
//import com.kyhd.dshp.manage.model.Aptitude;
//import com.kyhd.dshp.manage.model.User;
//import com.kyhd.dshp.manage.vo.Result;
//import com.kyhd.dshp.modules.model.AdvDataReqField;
//import com.kyhd.dshp.modules.model.UpDatePwd;
//import com.kyhd.dshp.modules.service.AdvertiserService;
//import com.kyhd.dshp.modules.service.BusUnitService;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiImplicitParams;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//
//@RestController
//@Api(tags = "广告主增删改查，列表，功能(Has the paging)")
//@RequestMapping("/manage/api/bus/user")
//public class AdvertiserController {
//
//	@Autowired
//	AdvertiserService advertiserService;
//	
//	@Autowired
//	private BusUnitService busUnitService;
//	
//	@ApiOperation(value = "新增广告主用户")
//	@RequestMapping(value = "add", method = RequestMethod.POST)
//	@ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "roleId", value = "角色Id", dataType = "Integer"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result busUserAdd(@RequestParam Integer roleId,@RequestBody @ApiParam(name = "User对象", value = "传入json格式", required = true) User user) {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				int count = advertiserService.getCountByName(user.getAccountName(),user.getUsername(),user.getId());
//				if(count == 0) {
//					System.out.println(user.getImportData());
//					JSONObject jsonObj = advertiserService.addUser(user, roleId);
//					return new Result(ResultStatusCode.OK,jsonObj);
//				}else {
//					return new Result(ResultStatusCode.ACCOUNT_OR_LOGINNAME_REPEAT);
//				}
//				
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//    
//    @ApiOperation(value = "修改广告主用户")
//	@RequestMapping(value = "update", method = RequestMethod.POST)
//    @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "roleId", value = "角色Id", dataType = "Integer"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result busUserUpdate(@RequestParam Integer roleId,@RequestBody @ApiParam(name = "User对象", value = "传入json格式", required = true) User user) {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				int count = advertiserService.getCountByName(user.getAccountName(),user.getUsername(),user.getId());
//				if(count <= 1) {
//					advertiserService.updateUser(user, roleId);
//					return new Result(ResultStatusCode.OK);
//				}else {
//					return new Result(ResultStatusCode.ACCOUNT_OR_LOGINNAME_REPEAT);
//				}
//				
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//    
//    @ApiOperation(value = "资质新增")
//	@RequestMapping(value = "upload_aptitude", method = RequestMethod.POST)
//    @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "userId", value = "用户id", dataType = "String"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result busAptitudeUpload(@RequestBody @ApiParam(name = "List对象", value = "传入list格式", required = true) List<Aptitude> list,@RequestParam String userId) {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				advertiserService.addAptitude(list, userId);
//				return new Result(ResultStatusCode.OK);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//    
//    @ApiOperation(value = "资质修改")
//	@RequestMapping(value = "update_aptitude", method = RequestMethod.POST)
//    @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "userId", value = "用户id", dataType = "Integer"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result busAptitudeUpdate(@RequestBody @ApiParam(name = "List对象", value = "传入list格式", required = true) List<Aptitude> list,@RequestParam String userId) {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				advertiserService.updateAptitude(list, userId);
//				return new Result(ResultStatusCode.OK);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//    
//    
//    @ApiOperation(value = "广告主账户下拉")
//	@RequestMapping(value = "username_list", method = RequestMethod.POST)
//	@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")
//	public Result getUserNameList() {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				List<JSONObject> list = advertiserService.getUserNameList();
//				return new Result(ResultStatusCode.OK,list);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//    @ApiOperation(value = "公司名称下拉")
//	@RequestMapping(value = "company_list", method = RequestMethod.POST)
//	@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")
//	public Result getCompanyList() {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				List<JSONObject> list = advertiserService.getCompanyList();
//				return new Result(ResultStatusCode.OK,list);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//    @ApiOperation(value = "广告主状态下拉")
//	@RequestMapping(value = "status_list", method = RequestMethod.POST)
//	@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")
//	public Result getAdvertiserStatus() {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				List<JSONObject> list = advertiserService.getAdvertiserStatus();
//				return new Result(ResultStatusCode.OK,list);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//    
//    @ApiOperation(value = "【通用】重置密码")
//	@RequestMapping(value = "reset_pwd", method = RequestMethod.POST)
//    @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "userId", value = "用户id", dataType = "Integer"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result resetPassword(@RequestParam Integer userId) {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				JSONObject json = advertiserService.resetPassword(userId);
//				return new Result(ResultStatusCode.OK,json);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//    
//    @ApiOperation(value = "获取广告主余额")
//	@RequestMapping(value = "getremain", method = RequestMethod.POST)
//	@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")
//	public Result getUserRemain(@RequestParam String userId) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				
//				BigDecimal advertiserRemain = advertiserService.getUserRemain(userId);
//				JSONObject json =  new JSONObject();
//				json.put("remain", advertiserRemain);
//				return new Result(ResultStatusCode.OK,json);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST, e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//    
//    
//    @ApiOperation(value = "获取广告主列表")
//	@RequestMapping(value = "get_user_list", method = RequestMethod.POST)
//    @ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")
//	public Result getUserList(@RequestBody @ApiParam(name = "广告主列表传值对象", value = "传入json格式", required = true) AdvDataReqField advDataReqField) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				JSONObject json = advertiserService.getUserList( advDataReqField);
//				
//				return new Result(ResultStatusCode.OK,json);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST, e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//    
//    @ApiOperation(value = "设置账户盈利比")
//	@RequestMapping(value = "setearnings", method = RequestMethod.POST)
//	@ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "ids", value = "账户id", dataType = "String"),
//			@ApiImplicitParam(paramType = "query", name = "ratio", value = "账户盈利比", dataType = "String"),
//			@ApiImplicitParam(paramType = "query", name = "userId", value = "被操作账号userId", required = true, dataType = "int"),
//			@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result updateEarningsRatio(@RequestParam String ids, @RequestParam String ratio, @RequestParam Integer userId) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				String[] id = ids.split(",");
//				advertiserService.updateUserEarningsRatio(id, ratio, userId);
//				advertiserService.addUserProfitPercentage(id, ratio, userId);
//				advertiserService.deleteUserProfitPercentage(id);
//				List<Integer> list = busUnitService.getUnitListByUserId(id);
//				System.out.println(list.toString());
//				List<String> newList = new ArrayList<String>(list.size()) ;
//				for (Integer myInt : list) { 
//				  newList.add(String.valueOf(myInt)); 
//				}
//				String[] idss=newList.toArray(new String[newList.size()]);
//				busUnitService.updateUnitEarningsRatio(idss,ratio);
//				busUnitService.addUnitProfitPercentage(idss, ratio);
//				busUnitService.deleteProfitPercentage(idss);
//				return new Result(ResultStatusCode.OK);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "设置账户曝光数比")
//	@RequestMapping(value = "setexposure", method = RequestMethod.POST)
//	@ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "ids", value = "账户id", dataType = "String"),
//			@ApiImplicitParam(paramType = "query", name = "ratio", value = "账户曝光数比", dataType = "String"),
//			@ApiImplicitParam(paramType = "query", name = "userId", value = "被操作账号userId", required = true, dataType = "int"),
//			@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result updateExposureRatio(@RequestParam String ids, @RequestParam String ratio, @RequestParam Integer userId) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				String[] id = ids.split(",");
//				advertiserService.updateUserExposureRatio(id, ratio, userId);
//				advertiserService.addUserDisplayPercentage(id, ratio, userId);
//				advertiserService.deleteUserDisplayPercentage(id);
//				List<Integer> list = busUnitService.getUnitListByUserId(id);
//				System.out.println(list.toString());
//				List<String> newList = new ArrayList<String>(list.size()) ;
//				for (Integer myInt : list) { 
//				  newList.add(String.valueOf(myInt)); 
//				}
//				String[] idss=newList.toArray(new String[newList.size()]);
//				busUnitService.updateUnitExposureRatio(idss,ratio);
//				
//				busUnitService.addUnitDisplayPercentage(idss, ratio);
//				busUnitService.deleteDisplayPercentage(idss);
//				return new Result(ResultStatusCode.OK);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "根据userId获取账户历史盈利比")
//	@RequestMapping(value = "getearnings", method = RequestMethod.GET)
//	@ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "userId", value = "userId", dataType = "String"),
//			@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result getHisEarningsRatio(@RequestParam String userId) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				JSONObject jsonObject = new JSONObject();
//				List<Object> list = advertiserService.getHisEarningsRatioById(userId);
//				jsonObject.put("data", list);
//				return new Result(ResultStatusCode.OK,jsonObject);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "根据userId获取账户历史曝光数比")
//	@RequestMapping(value = "getexposure", method = RequestMethod.GET)
//	@ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "userId", value = "userId", dataType = "String"),
//			@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result getHisExposureRatio(@RequestParam String userId) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				JSONObject jsonObject = new JSONObject();
//				List<Object> list = advertiserService.getHisExposureRatioById(userId);
//				jsonObject.put("data", list);
//				return new Result(ResultStatusCode.OK,jsonObject);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	
//	@ApiOperation(value = "根据userId获取账户信息")
//	@RequestMapping(value = "get_account_info", method = RequestMethod.POST)
//	@ApiImplicitParams({
//		@ApiImplicitParam(paramType = "query", name = "userId", value = "userId", dataType = "String"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")
//	})
//	public Result getAccountInformation(@RequestParam String userId) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				Map<String,Object> map = advertiserService.getAccountInformation(userId);
//				return new Result(ResultStatusCode.OK,map);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "根据userId获取账户资质列表")
//	@RequestMapping(value = "get_account_aptitude", method = RequestMethod.POST)
//	@ApiImplicitParams({
//		@ApiImplicitParam(paramType = "query", name = "userId", value = "userId", dataType = "String"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")
//	})
//	public Result getAccountAptitudeList(@RequestParam String userId) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				JSONObject jsonObject = advertiserService.getAccountAptitudeList(userId);
//				return new Result(ResultStatusCode.OK,jsonObject);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "修改当前账户密码")
//	@RequestMapping(value = "update_pwd", method = RequestMethod.POST)
//	@ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "userId", value = "被操作账号userId", required = true, dataType = "int"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")})
//	public Result updatePassword(@RequestBody @ApiParam(name = "UpDatePwd对象", value = "传入json格式", required = true) UpDatePwd upDatePwd, @RequestParam Integer userId) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				String passWord = ((User)SecurityUtils.getSubject().getPrincipal()).getPassword().toString();
//				boolean flag = advertiserService.updatePassword(passWord,upDatePwd.getNewPassword(),upDatePwd.getOldPassword(),userId);
//				if(flag) {
//					return new Result(ResultStatusCode.OK);
//				}else {
//					return new Result(ResultStatusCode.OLDPWD_ERROR);
//				}
//				
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "【通用】停用,启用账户")
//	@RequestMapping(value = "status", method = RequestMethod.POST)
//	@ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "ids",required = true, value = "账户ids", dataType = "String"),
//			@ApiImplicitParam(paramType = "query", name = "status", required = true,value = "账户状态", dataType = "Integer"),
//			@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result updateAccountStatus(@RequestParam String ids, @RequestParam Integer status) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				String[] id = ids.split(",");
//				advertiserService.updateAccountStatus(id, status);
//				return new Result(ResultStatusCode.OK);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	
//	//=================================================管理员账户管理=====================================================================//
//	
//	@ApiOperation(value = "【Admin】新增管理员用户")
//	@RequestMapping(value = "add_admin", method = RequestMethod.POST)
//	@ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "roleId", value = "角色Id", dataType = "Integer"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result busAdminUserAdd(@RequestParam Integer roleId,@RequestBody @ApiParam(name = "User对象", value = "传入json格式", required = true) User user) {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				int count = advertiserService.getCountByName(user.getAccountName(),user.getUsername(),user.getId());
//				if(count == 0) {
//					JSONObject jsonObj = advertiserService.addAdminUser(user, roleId);
//					return new Result(ResultStatusCode.OK,jsonObj);
//				}else {
//					return new Result(ResultStatusCode.ACCOUNT_OR_LOGINNAME_REPEAT);
//				}
//				
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "【Admin】修改管理员用户")
//	@RequestMapping(value = "update_admin", method = RequestMethod.POST)
//    @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "roleId", value = "角色Id", dataType = "Integer"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result busAdminUserUpdate(@RequestParam Integer roleId,@RequestBody @ApiParam(name = "User对象", value = "传入json格式", required = true) User user) {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				int count = advertiserService.getCountByName(user.getAccountName(),user.getUsername(),user.getId());
//				if(count <= 1) {
//					advertiserService.updateAdminUser(user,roleId);
//					return new Result(ResultStatusCode.OK);
//				}else {
//					return new Result(ResultStatusCode.ACCOUNT_OR_LOGINNAME_REPEAT);
//				}
//				
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "【Admin】管理员账户下拉")
//	@RequestMapping(value = "get_admin_username_list", method = RequestMethod.POST)
//	@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")
//	public Result getAdminUserNameList() {
//		
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				List<JSONObject> list = advertiserService.getAdminUserNameList();
//				return new Result(ResultStatusCode.OK,list);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "【Admin】获取管理员列表")
//	@RequestMapping(value = "get_admin_list", method = RequestMethod.POST)
//    @ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")
//	public Result getAdminUserList(@RequestBody @ApiParam(name = "广告主列表传值对象", value = "传入json格式", required = true) AdvDataReqField advDataReqField) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				JSONObject json = advertiserService.getAdminUserList(advDataReqField);
//				
//				return new Result(ResultStatusCode.OK,json);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST, e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "【Admin】根据userId获取管理员账户信息")
//	@RequestMapping(value = "get_admin_account_info", method = RequestMethod.POST)
//	@ApiImplicitParams({
//		@ApiImplicitParam(paramType = "query", name = "userId", value = "userId", dataType = "String"),
//		@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header")
//	})
//	public Result getAdminAccountInformation(@RequestParam String userId) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				Map<String,Object> map = advertiserService.getAdminAccountInformation(userId);
//				return new Result(ResultStatusCode.OK,map);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST,e);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//	
//	@ApiOperation(value = "【通用】删除账户")
//	@RequestMapping(value = "delete_account", method = RequestMethod.POST)
//	@ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "ids",required = true, value = "账户ids", dataType = "String"),
//			@ApiImplicitParam(name = "x-access-token", value = "token令牌", required = true, dataType = "String", paramType = "header") })
//	public Result updateAccountStatus(@RequestParam String ids ) {
//		if (SecurityUtils.getSubject().isAuthenticated()) {
//			try {
//				String[] id = ids.split(",");
//				advertiserService.deleteAccount(id);
//				return new Result(ResultStatusCode.OK);
//			} catch (Exception e) {
//				return new Result(ResultStatusCode.BAD_REQUEST);
//			}
//		} else {
//			return new Result(ResultStatusCode.INVALID_CLIENTID);
//		}
//	}
//}
